package com.example.myspringboot.dao;

import com.example.myspringboot.bean.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TeacherMapper {
    public List<Teacher> queryAllTea();

    public Teacher queryTeaById(int id);

    public int updateTea(Teacher teacher);

    public int deleteTea(int id);

    public int insertTea(Teacher teacher);

    public List<Teacher> queryTeaByLike(@Param("name") String name, @Param("subject") String subject);
    //向mybatis里传入多个参数时，必须在dao里加入@Param，如果过多的参数，就把参数封装成bean
}
